$(document).ready(
		function() {
			$("#imprest").click(function() {
				var money = $("#money").val().trim();
				if (money == null || money == "") {
					alert("请输入充值金额");
					return;
				}
				
				if(!Helper.validata.isInteger(money)){
					Helper.message("金额格式错误(金额最多精确到元)!");
					return false;
				}
				if (parseFloat(money) < 1) {
					Helper.message("充值金额最低1元");
					return false;
				}
				var providerId=$("[name='paychannel']:checked").val();
				new Helper.RemoteTrans({
					params:{money:money,providerId:providerId},
					url : Helper.basePath
							+ "/member_operate/imprest.htm",
					isAsync : false,
					onSuccess : function(jsonData) {
						// 刷新登陆页
						new Helper.Window({
							title : "请确认充值结果",
							width : 320,
							height : 180,
							url : Helper.basePath
									+ "/page/member/sub/imprest_popup.jsp",
							onSuccess : function(data1) {
								this.close();
							}
						}).show();
						if(!jsonData.isSuccess){
							alert(jsonData.message);
							return;
						}
						var direc_page = window.open("", "direc_page");
						direc_page.document
								.write(jsonData.returnValue.orderFormContent);
					},
					onError : function(data) {
						Helper.message(data.message);
					}
				}).send();
			});
		});